<!DOCTYPE html>
<html lang="en">

  <head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>箭头函数的应用</title>
  </head>

  <body>

  </body>
  <script>
    /* 
    箭头函数的应用
    */
    //1.定时器的应用
    setTimeout(() => {
      console.log("我是一个定时器");
    }, 1000)

    //2.回调函数的使用
    let arr = [1, 2, 3, 4];
    arr.forEach((item) => console.log(item));
  </script>

</html>